const KoaRouter = require('@koa/router')
const { verifyAuthorization } = require('../middleware/login.middleware')
const profileController = require('../controller/profile.controller')


const profileRouter = new KoaRouter({ prefix: '/profile' })
// 获取用户信息
profileRouter.get('/', verifyAuthorization, profileController.getUserMessage)
// 设置用户电话
profileRouter.patch('/phone', verifyAuthorization, profileController.addUserPhone)
// 设置用户邮箱
profileRouter.patch('/email', verifyAuthorization, profileController.addUserEmail)
// 设置用户个人介绍
profileRouter.patch('/introduce', verifyAuthorization, profileController.addUserIntroduce)


module.exports = profileRouter